<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>usb: Examples</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.gif"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">usb
   </div>
   <div id="projectbrief">Xilinx SDK Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('example.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Examples </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>You can refer to the below stated example applications for more details which gives an idea of how the USB and its driver can be used for Bulk and Interrupt tranfers.</p>
<h1><a class="anchor" id="ex1"></a>
xusb_types.h</h1>
<p>This headerfile contains the constants, type definitions, variables as used in the USB chapter 9 and mass storage demo application.</p>
<p>For details, see <a class="el" href="xusb__types_8h.html" title="This file contains the constants, type definitions, variables as used in the USB chapter 9 and mass s...">xusb_types.h</a>.</p>
<h1><a class="anchor" id="ex2"></a>
xusb_cp9.c</h1>
<p>Contains an example on how to use the <a class="el" href="struct_x_usb.html" title="The XUsb driver instance data. ">XUsb</a> driver directly. This example contains the USB Chapter 9 related functions.</p>
<p>For details, see <a class="el" href="xusb__cp9_8c.html" title="This file contains the USB Chapter 9 related functions. ">xusb_cp9.c</a>.</p>
<h1><a class="anchor" id="ex3"></a>
xusb_cp9.h</h1>
<p>This headerfile contains the constants, typedefs, variables and functions prototypes related to the USB chapter 9 related code.</p>
<p>For details, see <a class="el" href="xusb__cp9_8h.html" title="This file contains the constants, typedefs, variables and functions prototypes related to the USB cha...">xusb_cp9.h</a>.</p>
<h1><a class="anchor" id="ex4"></a>
xusb_storage.c</h1>
<p>Contains an example on how to use the <a class="el" href="struct_x_usb.html" title="The XUsb driver instance data. ">XUsb</a> driver directly. This is the bulk transfer example which contains Mass storage device application related functions.</p>
<p>For details, see <a class="el" href="xusb__storage_8c.html" title="This file contains Mass storage device application related functions. ">xusb_storage.c</a>.</p>
<h1><a class="anchor" id="ex5"></a>
xusb_storage.h</h1>
<p>This headerfile contains the constants, type definitions, variables and function prototypes used in the mass storage application.</p>
<p>For details, see <a class="el" href="xusb__storage_8h.html" title="This file contains the constants, type definitions, variables and function prototypes used in the mas...">xusb_storage.h</a>.</p>
<h1><a class="anchor" id="ex6"></a>
xusb_keyboard.c</h1>
<p>Contains an example on how to use the <a class="el" href="struct_x_usb.html" title="The XUsb driver instance data. ">XUsb</a> driver directly. This is the USB keyboard example which uses the USB for interrupt transfers.</p>
<p>For details, see <a class="el" href="xusb__keyboard_8c.html" title="This file contains an example for USB keyboard. ">xusb_keyboard.c</a>.</p>
<h1><a class="anchor" id="ex7"></a>
xusb_keyboard.h</h1>
<p>This headerfile contains the constants, type definitions, variables and function prototypes used in the USB keyboard example.</p>
<p>For details, see <a class="el" href="xusb__keyboard_8h.html" title="This file contains the constants, type definitions, variables and function prototypes used in the USB...">xusb_keyboard.h</a>.</p>
<h1><a class="anchor" id="ex8"></a>
xusb_mouse.c</h1>
<p>Contains an example on how to use the <a class="el" href="struct_x_usb.html" title="The XUsb driver instance data. ">XUsb</a> driver directly. This is the USB mouse example which uses the USB for interrupt transfers.</p>
<p>For details, see <a class="el" href="xusb__mouse_8c.html" title="This file contains an example for USB Mouse. ">xusb_mouse.c</a>.</p>
<h1><a class="anchor" id="ex9"></a>
xusb_mouse.h</h1>
<p>This headerfile contains the constants, type definitions, variables and function prototypes used in the mouse application.</p>
<p>For details, see <a class="el" href="xusb__mouse_8h.html" title="This file contains the constants, type definitions, variables and function prototypes used in the mou...">xusb_mouse.h</a>.</p>
<h1><a class="anchor" id="ex10"></a>
xusb_dma_intr_storage.c</h1>
<p>Contains an example on how to use the <a class="el" href="struct_x_usb.html" title="The XUsb driver instance data. ">XUsb</a> driver directly. This is the bulk transfer example which contains USB mass storage device application function with SCSI command processing and related response preparation being implemented as a part of the interrupt handler.</p>
<p>For details, see <a class="el" href="xusb__dma__intr__storage_8c.html" title="This file has the USB example Mass storage device application function with SCSI command processing a...">xusb_dma_intr_storage.c</a>.</p>
<h1><a class="anchor" id="ex11"></a>
xusb_phy_read_write.c</h1>
<p>Contains an example on how to use the <a class="el" href="struct_x_usb.html" title="The XUsb driver instance data. ">XUsb</a> driver directly. This example demonstrates the ULPI PHY read/write register access.</p>
<p>For details, see <a class="el" href="xusb__phy__read__write_8c.html" title="This file contains PHY register access related example. ">xusb_phy_read_write.c</a>.</p>
<h1><a class="anchor" id="ex12"></a>
xusb_microphone.c</h1>
<p>Contains an example on how to use the <a class="el" href="struct_x_usb.html" title="The XUsb driver instance data. ">XUsb</a> driver directly. This example contains the usb Microphone application related functions and provides a reference as to how an isochronous transfer related application can be written.</p>
<p>For details, see <a class="el" href="xusb__microphone_8c.html" title="This file contains usb Microphone application related functions. ">xusb_microphone.c</a>.</p>
<h1><a class="anchor" id="ex13"></a>
xusb_microphone.h</h1>
<p>This headerfile contains the constants, type definitions, variables and function prototypes used in the usb microphone application.</p>
<p>For details, see <a class="el" href="xusb__microphone_8h.html" title="This file contains the constants, type definitions, variables and function prototypes used in the usb...">xusb_microphone.h</a>.</p>
<h1><a class="anchor" id="ex14"></a>
xusb_storage_polled_mode.c</h1>
<p>Contains an example on how to use the <a class="el" href="struct_x_usb.html" title="The XUsb driver instance data. ">XUsb</a> driver directly. This example contains Mass storage device application related functions implemented in polled mode.</p>
<p>For details, see <a class="el" href="xusb__storage__polled__mode_8c.html" title="This file contains Mass storage device application related functions implemented in polled mode...">xusb_storage_polled_mode.c</a>.</p>
<h2><a class="anchor" id="Notes"></a>
Notes</h2>
<ul>
<li>These examples are independent from one another. All the examples except the the phy_read_write example should include the <a class="el" href="xusb__cp9_8c.html" title="This file contains the USB Chapter 9 related functions. ">xusb_cp9.c</a> file.</li>
<li>The constants HID_DEVICES, USB_MOUSE, USB_KEYBOARD and MASS_STORAGE_DEVICE defined in the <a class="el" href="xusb__types_8h.html" title="This file contains the constants, type definitions, variables as used in the USB chapter 9 and mass s...">xusb_types.h</a> file are to be used for testing the examples.</li>
<li>To run mass storage examples, the constant definition MASS_STORAGE_DEVICE is to be defined and the constants HID_DEVICES, USB_KEYBOARD and USB_MOUSE are to be undefined.</li>
<li>To run keyboard example, the constants HID_DEVICES and USB_KEYBOARD are to be defined and the constant definitions MASS_STORAGE_DEVICE and USB_MOUSE are to be undefined.</li>
<li>To run mouse example, the constants HID_DEVICES and USB_MOUSE are to be defined and the constant definitions MASS_STORAGE_DEVICE and USB_KEYBOARD are to be undefined.</li>
<li>To run the microphone example the constant definition MICROPHONE has to be defined and the other example constant definitions should be undefined. </li>
</ul>
</div></div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Copyright &copy; 2015 Xilinx Inc. All rights reserved.</li>
  </ul>
</div>
</body>
</html>
